const azBuild = require('az-esbuild')
const { readdirSync } = require('fs')

function build(package) {
  ;[].concat(require(`../src/${package}/build.js`)).forEach((item) => azBuild(item))
}

process.argv[2] ? process.argv.slice(2).forEach(build) : readdirSync('./src').forEach(build)
